package com.byit.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.byit.domain.SysInterfaceApp;
import com.byit.mapper.SysInterfaceAppMapper;
import com.byit.service.ISysInterfaceAppService;
import com.byit.utils.PageUtil;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 接口app关联管理 服务层
 * 
 * @author tjm
 */
@Service
public class SysInterfaceAppServiceImpl extends ServiceImpl<SysInterfaceAppMapper, SysInterfaceApp> implements ISysInterfaceAppService {

    @Override
    public Page<JSONObject> selectPageData(Page<SysInterfaceApp> pageInfo, Map<String, Object> map) {
        List<JSONObject> list = this.baseMapper.selectDataPage(pageInfo,map);
        Page<JSONObject> page = PageUtil.transform(pageInfo);
        page.setRecords(list);
        return page;
    }

    @Override
    public Page<JSONObject> selectPageOutData(Page<JSONObject> pageInfo, Map<String, Object> map) {
        List<JSONObject> list = this.baseMapper.selectPageOutData(pageInfo,map);
        Page<JSONObject> page = PageUtil.transform(pageInfo);
        page.setRecords(list);
        return page;
    }
}
